#ifndef TOTPLIST_H
#define TOTPLIST_H
#include <QWidget>
#include <QListWidgetItem>
#include <totp/totp.h>
#include <utils/clipboardwatcher.h>
namespace data_display {
class TOTPListWidget : public QWidget {
	Q_OBJECT

public:
	TOTPListWidget(utils::ClipboardWatcher &clipboard_watcher, QWidget *parent = nullptr);

	void addTOTP(const totp::TOTP& totp);


public slots:
	void copyTOTPToClipboard(QListWidgetItem *item);

	void copyTOTPToClipboard(const QString& password);

	void onTOTPDeleteRequested(const totp::TOTP &totp);

signals:
	void PasswordCopied();

	void totpDeleted(const totp::TOTP&);

private:
	QListWidget *totpListWidget;
	utils::ClipboardWatcher &_clipboard_watcher;
};
}
#endif //TOTPLIST_H
